import { createRouter, createWebHistory } from "vue-router";

const routes = [
    {
        path: '/',
        redirect: '/home'
    },
    {
        path: '/login',
        name: 'login',
        component: () => import('@/views/Login.vue')
    },
    {
        path: '/home',
        name: 'home',
        component: () => import('@/views/Home.vue')
    },
    {
        path: '/data',
        name: 'data',
        component: () => import('@/views/Data.vue')
    },
    {
        path: '/setting',
        name: 'setting',
        component: () => import('@/views/Setting.vue')
    },
    {
        path: '/detail',
        name: 'detail',
        component: () => import('@/views/Detail.vue')
    }
]

const router = createRouter({
    history: createWebHistory(),
    routes,
})

export default router